{
  "properties" : { },
  "id" : "copy1739540032372d4746",
  "script" : null,
  "groupId" : "b3703296495946aabf6a72b7d085c5d6",
  "name" : "移动文件(恢复错误移动用)",
  "createTime" : null,
  "updateTime" : 1739541576223,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "move_file_copy",
  "method" : "GET",
  "parameters" : [ {
    "name" : "search",
    "value" : "网络下载_",
    "description" : null,
    "required" : true,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": 1\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.File;
import log;

var datalist = db.table('file_videos').where().like('path','%'+search+'%').select();

for (item in datalist) {
    var nextUrl = item.path.replace('网络下载_', '网络下载\\');
    var nextName = item.name.replace('网络下载_', '');
    
    // cmd 移动
    String cmd = "cmd /c move \""+item.path+"\"" + " \""+nextUrl+"\"";
    Process process = Runtime.getRuntime().exec(cmd);
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
    process.waitFor();
    // data 修正
    item.path = nextUrl;
    item.name = nextName;
    db.table('file_videos').where().eq('id', item.id).update(item)
}

return 1